1. Field of the Invention
The invention relates to a semiconductor device.
2. Description of Related Art
Conventionally, there is known an art of detecting a current flowing to a transistor, and a current flowing to a diode that is connected in inverse parallel to the transistor, through the use of a common sense resistor that is connected to a sense transistor and a sense diode (e.g., see Japanese Patent Application Publication No. 2012-19550 (JP-2012-19550 A)). A current proportional to the current flowing to the transistor flows to the sense transistor, and a current proportional to the current flowing to the diode flows to the sense diode.
However, the magnitude of the current desired to be detected in the transistor is different from the magnitude of the current desired to be detected in the diode. Therefore, there are cases where the ratio of the current flowing to the sense diode to the current flowing to the diode is desired to be increased. In the case where this ratio is set large, when an unintended overcurrent flows to the diode, the resistor that is connected to the sense transistor and the sense diode may deteriorate.